package com.dmall;

import com.dmall.config.RootConfig;
import com.dmall.config.WebConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * 注解版的DispatcherServlet初始化类
 * 用于加载RootConfig、WebConfig配置类
 *
 * @author xiao1.wang@dmall.com
 * @date 2019-03-21 18:25:34
 */
public class AnnotationConfigDispatcherServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{RootConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
